﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace caculate
{
    public partial class children_operate : Form
    {
        public children_operate()
        {
            InitializeComponent();
        }

        public class PublicValue4
        {
            public static int is_exercised;//是否完成当前训练
            //public static Exc frm_exc;

        }


        private void children_operate_Load(object sender, EventArgs e)
        {
            PublicValue4.is_exercised = 1;
            //PublicValue4.frm_exc = new Exc() { TopLevel = false, FormBorderStyle = FormBorderStyle.None };
        }


        private void exercise_Click(object sender, EventArgs e)
        {
            //Exc.time.control = 0;
           //Exc.c
            if(PublicValue4.is_exercised==1)
            {
            this.panel.Controls.Clear();
            Exc frm_exc = new Exc() { TopLevel = false, FormBorderStyle = FormBorderStyle.None };
            this.panel.Controls.Add(frm_exc);
                Exc.time.control = 0;
                frm_exc.ChangeEnable_true_checkanswer();
                frm_exc.ChangeEnable_true_choosemode();
                frm_exc.Show();
                this.exercise.Text = "新的练习";
                PublicValue4.is_exercised = 0;
                Exc.control = 0;
            }
            else
            {
                MessageBox.Show("请先完成当前训练！", "提示");
            }


        }

        private void problems_Click(object sender, EventArgs e)
        {

            PublicValue4.is_exercised = 1;
            this.panel.Controls.Clear();
            Problems frm_prb=new Problems() { TopLevel = false, FormBorderStyle = FormBorderStyle.None };
            this.panel.Controls.Add(frm_prb);
            frm_prb.Show();
        }

        private void listView1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}
